package cn.pn.project.pnpayprovider.service;

import cn.pn.project.mapper.pay.PayMapper;
import cn.pn.project.pojo.pay.PnTrade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

@RestController
public class PayService {

    @Autowired
    private PayMapper payMapper;

    /**
     * 新增支付记录
     * @param pnTrade
     * @return
     * @throws SQLException
     */
    @RequestMapping(value = "/addPnTrade")
    public Integer addPnTrade(@RequestBody PnTrade pnTrade) throws SQLException {
        return payMapper.addPnTrade(pnTrade);
    }
}
